This page last changed on Jul 12, 2007 by stepheneb.
Disk images for running CC software on OLPC
Current Task Summary
These are in order of importance:
- jnlp from browser
- vernier usb device in windows on Parallels OSX usb kernel extensions
- vernier driver for CC Sensor library on olpc
- sound port command on olpc for walter
SoundGrapher on olpc emulator
Java running on olpc emulator
- simply install self extracting java
- I downloaded it locally and use scp to copy it to the emulator
- it appears to not work after installing java and rebooting, why?
I was able to install java 1.4.2_13 on OLPC image build 212
here is what I did
- downloaded selfextarcted package from the sun page
- in sugar press alt+ctrl+F2 login root
- in OLPC created directory /usr/local/java
- if there is no network start dhclient
- cd /usr/local/java
- using scp copy j2re-1_4_2_13-linux-i586.bin file to the /usr/local/java directory
- chmod u+x j2re-1_4_2_13-linux-i586.bin
- ./j2re-1_4_2_13-linux-i586.bin
- rm j2re-1_4_2_13-linux-i586.bin
- restart OLPC
now
java 1.4. uses deprecated (Fedora > 3) libXp.so library
so I downloaded xorg-x11-deprecated-libs-6.8.2-37.FC4.49.2.1.i386.rpm from the site
http://rpmfind.net/linux/rpm2html/search.php?query=libXp.so.6
I extracted file libXp.so.6.2 from that package and copied it to the OLPC's
/usr/lib directory. after that cd /usr/lib and
finally ln -s libXp.so.6.2 libXp.so.6
after that go back to the sugar: ctrl-alt-F7
in the image 212 there is new (I think) application
developer console (via alt-shift-F12)
so you can check javawebstart from there and it works just beautifully
Jnlp launching from the olpc webbrowser
- Figure out how to configure the webbrowser to launch javaws when a *.jnlp file is clicked on. This has been a problem because the browser doesn't download files, or ask about opening those files. And the browser doesn't have a file menu.
- here is an extension for setting the mimetypes in firefox: http://www.extensionsmirror.nl/index.php?showtopic=179
- The best way to solve this now seems to be turning on the xulrunner debugging. My guess is that some things are missing or disabled that prevent it from showing the helperApp dialog. I'd hope there will be some error message shown in the xulrunner console about this. For more info:
- try to get the folling running http://continuum.concord.org/jnlp/teemss2-snapshot.jnlp
after installing java 1.4 (see comments from above)
I was able to run teemss2-snapshot.jnlp file without visible problems
also I think we should run javaws -Xclearcache before every javaws run
Shrink Java
- the total size of java after installation is what is important, currently it is around 100MB. Start with getting down to 20MB - I have seen programs that come bundle with a java which is 20MB. But if it can be smaller ~5MB that would be better.
- Try using genjar to build a minium set of classes: http://genjar.sourceforge.net/
- if that doesn't work try doing it manually.
- I read removing unecessary fonts can make a big difference.
in the java 1.4 installation fonts folder is relatively small ~2.5MB
(that what du command returns at least)
the major offenders are rt.jar 25MB
directory lib/i386/server ~8MB
and lib/i386/client ~5MB
lib/plugin.jar ~1.6MB I tried to remove that file and it looks like
everything was fine.
Results
currently all java install takes 52MB of disk space
du output:
du /usr/local/java
....
51828 /usr/local/java
after removing plugin.jar it became ~50MB
- I removed lib/i386/server folder (~7.5M)
- and 2 small folders man and plugin
concord jnlp works fine
and size of the java folder is ~41.5M
original rt.jar has size ~22M
interesting that rt.jar has uncompressed files
- so I unjar content of rt.jar
- and created rt.jar with the command jar cf rt.jar *
in result I got workable rt.jar with size 11.5M
so currently java folder has size 29686K
df output is:
Filesystem 1K-blocks Used Available Use% Mounted on
/def/hda1 476913 398324 73665 85% /
- after removing com/sun/corba classes
I got size of the java folder 28891K and I have amount available blocks 74462
- I removed few fonts from the lib/fonts folder:
- LucidaBright*.ttf and LucidaTypewriter*.ttf
it gave us another 1.2MB
- also I created new rt.jar without java/sql and sun/jdbc
after jar we have another 0.15MB (not much but still)
additionally I removed these packages
- /com/sun/java/plaf/gtk
- /com/sun/java/plaf/windows
see attachment rt3.jar
upload it to OLPC image rename to rt.jar and put it to /usr/local/java/j2re.../lib/
folder (yet another 0.8MB)
Build Vernier Drivers Linux
- There is a vernier sdk for linux. It needs to be compiled in linux.
- Update the SensorNative project in CC cvs to work with the compiled vernier drivers for linux
Audio jack a2d sensors
Java Plugin in OLPC Browser
|